package com.example.android.network;

import java.util.HashMap;

public enum OutPacketType
{
	GesturePerformed("G"),
	Login("L"),
	MyLocationChanged("P"),
	BuildingConstructed("J"),
	Dummy("U"),
	;
	
	private static HashMap<String, OutPacketType> retranslations = new HashMap<String, OutPacketType>();
	private final String translation;
	
	static
	{
		for (OutPacketType packetType : OutPacketType.values())
		{
			retranslations.put(packetType.getTranslation(), packetType);
		}
	}
	
	OutPacketType(String translation)
	{
		this.translation = translation;
	}
	
	public String getTranslation()
	{
		return translation;
	}
	
	public static OutPacketType retranslate(String translation)
	{
		return retranslations.get(translation);
	}
}
